<template>
  <Grid :col="4" :border="false" padding="5px">
    <GridItem>
      <Button icon="md-add-circle" type="primary" @click="$emit('add-func')" style="margin-right: 5px">新增功能</Button>
      <Button icon="ios-remove-circle-outline" type="error" @click="$emit('batch-remove')">批量删除</Button>
    </GridItem>
    <GridItem>
      <Input search enter-button="查询" placeholder="Enter something..." v-model="search.value">
        <template #prepend>
          <Select v-model="search.name" style="width: 80px">
            <Option value="func">功能名</Option>
            <Option value="menu">菜单名</Option>
          </Select>
        </template>
      </Input>
    </GridItem>
  </Grid>
</template>

<script>
import {defineComponent} from 'vue'

export default defineComponent({
  name: "FuncSearch",
  emits: ["add-func", "batch-remove"],
  data() {
    return {
      search: {
        name: 'func',
        value: ''
      },
    }
  }
})
</script>

<style scoped>

</style>